package com.pp.service.impl;

import com.pp.bean.GovGoodsEacheStor;
import com.pp.mapper.GovGoodsEacheStorMapper;
import com.pp.service.GovGoodsEacheStorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pp.util.Respons.ResponseUtil;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 商品评价 服务实现类
 * </p>
 *
 * @author 张子艺
 * @since 2019-04-03
 */
@Service
public class GovGoodsEacheStorServiceImpl extends ServiceImpl<GovGoodsEacheStorMapper, GovGoodsEacheStor> implements GovGoodsEacheStorService {

    @Override
    public Map<String, Object> saveGoodStor(GovGoodsEacheStor goodsEacheStor) {
        Map map=new HashMap();
        map.put("relacation_id",goodsEacheStor.getRelacationId());
        map.put("lang",goodsEacheStor.getLang());
        removeByMap(map);
        if(save(goodsEacheStor)){
            return ResponseUtil.getSuccessMap();
        }
        return ResponseUtil.getExceptionMap();
    }
}
